<table border="1" cellspacing="5" cellpadding="10" width="70%" align="center">
  <thead>
    <tr>
      <th>Table Heading</th>
    </tr>
  </thead>
  <tbody>
<?php
for ($i = 1; $i <= 10 ; $i++)
{
  $color = $i%2==0?"yellow":"green";
?>
    <tr>
      <td style="background-color:<?=$color?>">Text <?=$i?></td>
    </tr>
<?php
}// end for
?>
  </tbody>
</table>
